package com.teensoft.core.user.imp;

import com.teensoft.base.dao.imp.HibernateDAO;
import com.teensoft.base.exception.DAOException;
import com.teensoft.core.user.Role;
import com.teensoft.core.user.RoleDAO;

public class RoleDAOImp extends HibernateDAO implements RoleDAO {

	public void addRole(Role role) throws DAOException {
		this.saveOrUpdate(role);
	}

	public void deleteRoleById(String id) throws DAOException {
		this.delete(Role.class, id);
	}

	public Role getById(String id) throws DAOException {
		return (Role)this.get(Role.class, id);
	}

	public void updateRole(Role role) throws DAOException {
		this.saveOrUpdate(role);
	}

}
